package com.yuntsg.nnsfcp.front.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuntsg.nnsfcp.front.entity.Searchfile;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author gcr
 * @since 2019-06-17
 */
public interface SearchfileMapper extends BaseMapper<Searchfile> {

    /**
     * 获取抓被引的结果
     *
     * @param applyId 订单id
     * @return
     */
    @Select("SELECT s.sid,s.apply_id,s.wos_id,s.search,f.fid,f.postdate,f.citedtext,t.ti,t.au,t.af,t.so,t.ut,t.ab,t.py,t.bp,t.ep,t.vl,t.di,t.dt FROM searchinfo s LEFT JOIN searchfile f ON s.sid = f.sid LEFT JOIN parsing_txt t ON t.file_id = f.fid WHERE s.`status` = 1 && s.apply_id = #{applyId}")
    public abstract List<Map<String, Object>> getAnalyticalResult(Integer applyId);

}
